<template>
  <div class="nav" ref="navRef">
    <i :class="[icon, 'icon']"></i>
    <span v-text="title" class="title"></span>
  </div>
</template>

<script>
export default {
  name: 'BallItem',
  props: {
    color: {
      type: String,
      default: 'rgb(255, 255, 255,.9)'
    },
    icon: {
      type: String,
      default: ''
    },
    title: {
      type: String,
      required: true
    }
  },
  data () {
    return {

    }
  },
  created () {

  },
  mounted () {
    this.$refs.navRef.style.background = this.color
  },
  methods: {

  }
}
</script>

<style scoped lang="less">
.nav {
  width: 150px;
  height: 50px;
  border: 5px solid #fff;
  border-radius: 50px;
  margin-bottom: 20px;
  padding: 0 20px;
  .icon {
    font-size: 35px;
  }
  .title {
    font-size: 30px;
    text-align: center;
    vertical-align: top;
  }
}
</style>
